import axios from "axios";

export const getList = (page,size,name) => {
    return axios({
        url: `/api/ingredient/list/${page}/${size}?name=`+name, method: 'post', data: {}, headers: {
            token: localStorage.getItem("wikiback-auth-token")
        }
    })
}
export const del = (id) => {
    return axios({
        url: '/api/ingredient/del/'+id, method: 'post', data: {}, headers: {
            token: localStorage.getItem("wikiback-auth-token")
        }
    })
}
export const add = (data) => {
    return axios({
        url: '/api/ingredient/insert', method: 'post', data: data, headers: {
            token: localStorage.getItem("wikiback-auth-token")
        }
    })
}
export const update = (data) =>{
    return axios({
        url: '/api/ingredient/update', method: 'post', data: data, headers: {
            token: localStorage.getItem("wikiback-auth-token")
        }
    })
}